package com.pinkpig.excel.xml.config;

import java.util.*;

/**
 * @author fengs
 */
public class TableExportContext {

    private Map<String, String> tableCategoryMap = new HashMap<>();

    private List<String> excludeTables = new ArrayList<>();

    private Map<String, List<String>> categoryTablesMap = new LinkedHashMap<>();

    public Map<String, String> getTableCategoryMap() {
        return tableCategoryMap;
    }

    public void setTableCategoryMap(Map<String, String> tableCategoryMap) {
        this.tableCategoryMap = tableCategoryMap;
    }

    public List<String> getExcludeTables() {
        return excludeTables;
    }

    public void setExcludeTables(List<String> excludeTables) {
        this.excludeTables = excludeTables;
    }

    public Map<String, List<String>> getCategoryTablesMap() {
        return categoryTablesMap;
    }

    public void setCategoryTablesMap(Map<String, List<String>> categoryTablesMap) {
        this.categoryTablesMap = categoryTablesMap;
    }

    public String getCategory(String tableName){
        return tableCategoryMap.containsKey(tableName)? tableCategoryMap.get(tableName):null;
    }

    public boolean isExclude(String tableName){
        return excludeTables.contains(tableName);
    }

}
